package com.dehui.traders.ui.activity;

import android.os.Bundle;
import com.dehui.traders.BR;
import com.dehui.traders.R;
import com.dehui.traders.databinding.ActivityMainBinding;
import com.dehui.traders.ui.viewmodle.MainViewModel;

import me.goldze.mvvmhabit.base.BaseActivity;

public class MainActivity extends BaseActivity<ActivityMainBinding, MainViewModel> {

    public static MainActivity context;

    @Override
    public int initContentView() {
        return R.layout.activity_main;
    }

    @Override
    public int initVariableId() {
        return BR.viewModel;
    }

    @Override
    public MainViewModel initViewModel() {
        return new MainViewModel(this);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        context = this;
        initToolbar();
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        context = null;
    }

    private void initToolbar() {
        setSupportActionBar(binding.mainToolbar);
    }


}
